#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int* singleNumbers(int* nums, int numsSize, int* returnSize)
{
	int ret = 0;
	int x = 1;
	int count = 0;
	int arr[2] = { 0 };
	for (int i = 0; i < numsSize; i++)
	{
		ret ^= nums[i];
	}
	for (int j = 0; j < 32; j++)
	{
		x = 1;
		if ((ret & (x <<= j)) == 1)
		{
			count = j;
		}
	}
	x = 1;
	arr[0] = ret;
	arr[1] = ret ^ (x <<= count);
	arr[0] ^= arr[1];
	return arr;
}
int main()
{
	int arr[] = {4,1,4,6};
	int sz = sizeof(arr) / sizeof(arr[0]);
	int* ret = singleNumbers(arr, sz, 2);
	for (int i = 0; i < 2; i++)
	{
		printf("%d ", ret[i]);
	}
	return 0;
}